package com.kexio.enterprise.integration.file.query;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 文件搜索条件
 * 
 * @author Kexio
 * @since 1.0.0
 */
public class FileSearchCriteria {
    private List<String> fileIds;
    private String fileName;
    private String fileNamePattern;
    private List<String> contentTypes;
    private String storageType;
    private String bucket;
    private String directory;
    private Long minSize;
    private Long maxSize;
    private LocalDateTime uploadTimeStart;
    private LocalDateTime uploadTimeEnd;
    private LocalDateTime accessTimeStart;
    private LocalDateTime accessTimeEnd;
    private boolean includeTemporary;
    private boolean includeExpired;
    private boolean onlyEncrypted;
    private List<String> tags;
    private int limit;
    private int offset;
    private String sortBy;
    private boolean ascending;
    private boolean includeDirectories;
    private String fileExtension;
    private String contentType;
    private LocalDateTime startTime;
    private LocalDateTime endTime;

    public FileSearchCriteria() {
        this.limit = 100;
        this.offset = 0;
        this.sortBy = "uploadTime";
        this.ascending = false; // 默认降序，最新的在前
        this.includeTemporary = false;
        this.includeExpired = false;
        this.onlyEncrypted = false;
    }

    // Getters and Setters
    public List<String> getFileIds() { return fileIds; }
    public void setFileIds(List<String> fileIds) { this.fileIds = fileIds; }
    
    public String getFileName() { return fileName; }
    public void setFileName(String fileName) { this.fileName = fileName; }
    
    public String getFileNamePattern() { return fileNamePattern; }
    public void setFileNamePattern(String fileNamePattern) { this.fileNamePattern = fileNamePattern; }
    
    public List<String> getContentTypes() { return contentTypes; }
    public void setContentTypes(List<String> contentTypes) { this.contentTypes = contentTypes; }
    
    public String getStorageType() { return storageType; }
    public void setStorageType(String storageType) { this.storageType = storageType; }
    
    public String getBucket() { return bucket; }
    public void setBucket(String bucket) { this.bucket = bucket; }
    
    public String getDirectory() { return directory; }
    public void setDirectory(String directory) { this.directory = directory; }
    
    public Long getMinSize() { return minSize; }
    public void setMinSize(Long minSize) { this.minSize = minSize; }
    
    public Long getMaxSize() { return maxSize; }
    public void setMaxSize(Long maxSize) { this.maxSize = maxSize; }
    
    public LocalDateTime getUploadTimeStart() { return uploadTimeStart; }
    public void setUploadTimeStart(LocalDateTime uploadTimeStart) { this.uploadTimeStart = uploadTimeStart; }
    
    public LocalDateTime getUploadTimeEnd() { return uploadTimeEnd; }
    public void setUploadTimeEnd(LocalDateTime uploadTimeEnd) { this.uploadTimeEnd = uploadTimeEnd; }
    
    public LocalDateTime getAccessTimeStart() { return accessTimeStart; }
    public void setAccessTimeStart(LocalDateTime accessTimeStart) { this.accessTimeStart = accessTimeStart; }
    
    public LocalDateTime getAccessTimeEnd() { return accessTimeEnd; }
    public void setAccessTimeEnd(LocalDateTime accessTimeEnd) { this.accessTimeEnd = accessTimeEnd; }
    
    public boolean isIncludeTemporary() { return includeTemporary; }
    public void setIncludeTemporary(boolean includeTemporary) { this.includeTemporary = includeTemporary; }
    
    public boolean isIncludeExpired() { return includeExpired; }
    public void setIncludeExpired(boolean includeExpired) { this.includeExpired = includeExpired; }
    
    public boolean isOnlyEncrypted() { return onlyEncrypted; }
    public void setOnlyEncrypted(boolean onlyEncrypted) { this.onlyEncrypted = onlyEncrypted; }
    
    public List<String> getTags() { return tags; }
    public void setTags(List<String> tags) { this.tags = tags; }
    
    public int getLimit() { return limit; }
    public void setLimit(int limit) { this.limit = limit; }
    
    public int getOffset() { return offset; }
    public void setOffset(int offset) { this.offset = offset; }
    
    public String getSortBy() { return sortBy; }
    public void setSortBy(String sortBy) { this.sortBy = sortBy; }
    
    public boolean isAscending() { return ascending; }
    public void setAscending(boolean ascending) { this.ascending = ascending; }
    
    public boolean isIncludeDirectories() { return includeDirectories; }
    public void setIncludeDirectories(boolean includeDirectories) { this.includeDirectories = includeDirectories; }
    
    public String getFileExtension() { return fileExtension; }
    public void setFileExtension(String fileExtension) { this.fileExtension = fileExtension; }
    
    public String getContentType() { return contentType; }
    public void setContentType(String contentType) { this.contentType = contentType; }
    
    public LocalDateTime getStartTime() { return startTime; }
    public void setStartTime(LocalDateTime startTime) { this.startTime = startTime; }
    
    public LocalDateTime getEndTime() { return endTime; }
    public void setEndTime(LocalDateTime endTime) { this.endTime = endTime; }
    
    // 别名方法以兼容旧代码
    public String getDirectoryPath() { return directory; }
    public void setDirectoryPath(String directoryPath) { this.directory = directoryPath; }
}
